#include <bits/stdc++.h>
using namespace std;
const int maxr = 400+5;
const int DX[] = {0, -1, 0, 1};
const int DY[] = {1, 0, -1, 0};
const char C[] = {'n', 'w', 's', 'e'};

int R;
bool m[maxr][maxr], vis[maxr][maxr];
vector<string> ans;

bool can(int x, int y){
    return 0<=x && x<=2*R && 0<=y && y<=2*R && m[x][y] && !vis[x][y];
}

void dfs(int x, int y, int step, int dir, const string& s){
    if(step-1 > R) return;
    if(x == R && y == R && step-1==R) ans.push_back(s);
    else{
        for (int i = -1; i <= 1; ++i) if(i!=0) {
            int tdir = (dir+i+4)%4;
            bool could = true;
            int dx = DX[tdir], dy = DY[tdir];
            int tx = x, ty = y;
            for (int j = 1; j <= step; ++j) {
                tx += dx, ty += dy;
                  if(!can(tx, ty)) {could = false; break;}
            }
            if(!could) continue;
            vis[tx][ty] = true;
            dfs(tx, ty, step+1, tdir, s+C[tdir]);
            vis[tx][ty] = false;
        }
    }
}

void init(){
    memset(m, true, sizeof(m));
    memset(vis, false, sizeof(vis));
    ans.clear();
}



int main() {
    ios_base::sync_with_stdio(false);cin.tie(nullptr);
    int T; cin >> T;
    while(T--){
        init();
        cin >> R;
        int N; cin >> N;
        for (int i = 0; i < N; ++i) {
            int x, y; cin >> x >> y;
            x += R, y += R;
            m[x][y] = false;
        }
        string s; int x = R, y = R, step = 1;
        for (int dir = 0; dir < 4; ++dir) {
            bool could = true;
            int dx = DX[dir], dy = DY[dir];
            int tx = x, ty = y;
            for (int i = 1; i <= step; ++i) {
                tx += dx, ty += dy;
                if(!can(tx, ty)) {could = false; break;}
            }
            if(!could) continue;
            dfs(tx, ty, step+1, dir, s+C[dir]);
        }
        for(string &str:ans) cout << str << "\n";
        cout << "Found " << ans.size() << " golygon(s).\n\n";
    }
    return 0;
}